<?php echo $this->headScript();?>
<?php echo $this->headLink();?>
<?php echo $this->partial('resume/menu-add-resume.phtml', array('step' => 'personal-info', 'resumeId' => $this->resumeRowset->getResumeId()));?>
<form name="frm" method="post" action="/resume/save-resume" onsubmit="return checkValid()" ENCTYPE="multipart/form-data">
<div class="from-add-01">
	<h2>Personal Details</h2>
	<ul>
		<li>
			<label>&nbsp;</label>
			<em class="error"><?php echo @$this->msg; ?></em>
		</li>
		<li>
			<label>Full Name <em>*</em></label>
			<input type="text" name="full_name" id="full_name" value="<?php echo $this->resumeRowset->getFullName();?>"/>
		</li>
		<li>
			<label>Birthday <em>*</em></label>
			<input type="text" name="birthday" id="birthday" value="<?php echo $this->resumeRowset->getBirthDay();?>" />
		</li>
		<li>
			<label>Gender <em>*</em></label>
			<input type="radio"	name="gender" value="Male" <?php echo ($this->resumeRowset->getGender() == 'Male')? "checked" : "" ?>/> <span>Male</span>  
			<input type="radio" name="gender" value="Female" <?php echo ($this->resumeRowset->getGender() == 'Female')? "checked" : "" ?>/> <span>Female</span>
		</li>
		<li>
			<label>Marital Status</label>
			<input type="radio"	name="marital_status" value="Single" <?php echo ($this->resumeRowset->getMaritalStatus() == 'Single')? "checked" : "" ?>/> <span>Single</span> 
			<input type="radio" name="marital_status" value="Married" <?php echo ($this->resumeRowset->getMaritalStatus() == 'Married')? "checked" : "" ?>/> <span>Married</span>  
			<input type="radio" name="marital_status" value="Divorced" <?php echo ($this->resumeRowset->getMaritalStatus() == 'Divorced')? "checked" : "" ?>/> <span>Divorced</span>
		</li>
		<li>
			<label>Email 1 <em>*</em></label>
			<input type="text" name="email1" id="email1"  value="<?php echo $this->resumeRowset->getEmail1();?>"/>
		</li>
		<li>
			<label>Email 2</label>
			<input type="text" name="email2" id="email2"  value="<?php echo $this->resumeRowset->getEmail2();?>"/>
		</li>
		<li>
			<label>Mobile 1 <em>*</em></label>
			<input type="text" name="mobile1" id="mobile1" value="<?php echo $this->resumeRowset->getMobile1();?>"/>
		</li>
		<li>
			<label>Mobile 2</label>
			<input type="text" name="mobile2" id="mobile2" value="<?php echo $this->resumeRowset->getMobile2();?>"/>
		</li>
		<li>
			<label>Telephone</label>
			<input type="text" name="tel" value="<?php echo $this->resumeRowset->getTel();?>"/>
		</li>
		<li>
			<label>Address <em>*</em></label>
			<input type="text" name="address" id="address" value="<?php echo $this->resumeRowset->getAddress();?>"/>
		</li>
		<li>
			<label>Upload file (&lt;3Mb)</label>
			<input type="file" name="file_resume" id="file" value=""/>
		</li>
		<li>
			<label>&nbsp;</label>
			<div class="actions">
				<input type="hidden" name="resume_id" value="<?php echo $this->resumeRowset->getResumeId();?>" />
				<a href="/resume" style="text-decoration:none;"><input type="button" class="button02" name="cancel" value="Cancel" /></a> &nbsp;&nbsp; 
				<input type="submit" class="button01" name="next" value="Next" />
			</div>
		</li>
	</ul>
</div>
</form>
<script>
function checkValid()
{
    var fullname = $("#full_name").val();
    var birthday = $("#birthday").val();
    var email1 = $("#email1").val();
    var mobile1 = $("#mobile1").val();
    var address = $("#address").val();
    var email = $("#email1").val();
    var fullname = $.trim(fullname);

    if(fullname == '' || birthday == '' || email1 == '' || mobile1 == '' || address == '') {
        $('.error').html('Please input into field required (*)');
        return false;
    }
    
   /* var checkfn = /^[\w-\.]{4,}?$/;
    if(!checkfn.test(fullname))
    {
   	 $('.error').html('Please enter full name (*)');
     return false;
    }*/

    var check = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
    if(!check.test(email))
    {
    	$('.error').html('please enter a valid email address');
    	return false;
    } 

    return true;
}   
</script>